import {
	request
} from './request'


// 测试接口
export const task = function() {
	return
}

// 获取轮播图
export const RotationChart = function() {
	return request('/banner')
}

// 获取首页图标
export const GetHomeIcon = function() {
	return request('/homepage/dragon/ball')
}

// 获取搜索关键字
export const GetSearchKey = function() {
	return request('/search/default')
}

// 获取推荐歌单
export const GetRecommendSongSheet = function(limit) {
	return request(`/personalized?limit=${limit}`)
}

// 获取歌单详情
export const GetRecommendSongSheetInfo = function(id) {
	return request(`/playlist/detail?id=${id}`)
}

// 获取歌单全部详情
export const GetRecommendSongSheetAllInfo = function(id) {
	return request(`/playlist/track/all?id=${id}`)
}

// 手机号登录
export const LoginCellphone = function(obj) {
	return request('/login/cellphone', obj, 'POST')
}

// 获取用户详情
export const GetUserInfo = function(nid) {
	return request(`/user/detail?uid=${nid}`)
}

// 获取音乐播放url
export const GetMusicUrl = function(id) {
	return request(`/song/url/v1?id=${id}&level=standard`)
}

// 获取视频标签
export const GetVideoLabel = function() {
	return request('/video/group/list')
}

// 获取搜索单曲内容
export const GetSearchContent = function(key) {
	return request(`/search?keywords=${key}&type=1&limit=30`)
}

// 获取搜索关键字推荐列表
export const GetSearchRecommend = function(text) {
	return request(`/search/suggest?keywords=${text}&type=mobile`)
}

// 获取热搜列表(详细)
export const GetHotSearchList = function() {
	return request('/search/hot/detail')
}

// 获取歌曲详情
export const GetSongInfo = function(id) {
	return request(`/song/detail?ids=${id}`)
}

// 获取最近播放
export const GetRecentPlays = function() {
	return request("/record/recent/song")
}

// 获取关注列表
export const GetFollows = function(id) {
	return request(`/user/follows?uid=${id}`)
}

// 获取粉丝列表
export const Getfolloweds = function(id) {
	return request(`/user/followeds?uid=${id}`)
}

// 关注或者取消关注
// 该接口返回302，没有完善该功能
export const Follow = function(id, t) {
	return request(`/follow?id=${id}&t=${t}`)
}

// 获取所有榜单
export const GetAllList = function() {
	return request('/toplist')
}

// 获取热门歌单分类
export const GetPlaylistHotLabel = function() {
	return request('/playlist/hot')
}

// 获取分类下的歌单
export const GetPlaylist = function(cat) {
	return request(`/top/playlist?cat=${cat}`)
}

// 获取全部歌单分类
export const GetPlaylistAllLabel = function(){
	return request('/playlist/catlist')
}